package com.hoshiicloud.as2c.minipro.feign.hystrix;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.as2c.minipro.feign.VeriCenterFeignService;
import org.springframework.stereotype.Component;

/**
 * @author yangcheng
 * @version 1.0
 * @title: HystrixVeriCenterFeignFallback
 * @description: 验证中心微服务FeignClient熔断器
 * @date 2019/5/31 15:32
 * @mail maiboyc@163.com
 */
@Component
public class HystrixVeriCenterFeignFallback implements VeriCenterFeignService {

    /**
     * 发送短信验证码
     * @param mobile        手机号码
     * @param code          验证码
     * @param expSecond     有效时间(单位:秒)
     * @return Response<SmsMsgResponse>
     */
    @Override
    public Response<String> sendCode(String mobile, String code, long expSecond) {
        return Response.failed("发送短信验证码失败");
    }

    /**
     * 校验验证码
     * @param msgId 短信ID
     * @param code  验证码
     * @return Response
     */
    @Override
    public Response checkCode(String msgId, String code) {
        return Response.failed("校验验证码失败");
    }

}
